//
//  MOAccountRelevanceViewCell.m
//  MobileOffice
//
//  Created by 冰冰 on 2019/6/21.
//  Copyright © 2019 com.idolmedia. All rights reserved.
//

#import "MOAccountRelevanceViewCell.h"

@interface MOAccountRelevanceViewCell ()

@end

@implementation MOAccountRelevanceViewCell

+(instancetype)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath
{
    //NSString *ID = [NSString stringWithFormat:@"Cell%ld%ld",(long)[indexPath section],(long)[indexPath row]];
    NSString *ID = @"MOAccountRelevanceViewCell";
    MOAccountRelevanceViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil){
        cell = [[MOAccountRelevanceViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        [cell creatView];
    }
    return cell;
}


-(void)creatView
{
    [self addSubview:self.titleLabel];
    [self addSubview:self.textField];
    [self addSubview:self.arrowImageView];
}


#pragma mark -- 懒加载
- (UIImageView *)arrowImageView{
    if (!_arrowImageView) {
        _arrowImageView = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 17 - 7, 0, 7, 12)];
        _arrowImageView.centerY = kHConversions(54)/2;
        _arrowImageView.image = IMAGE(@"setUp_arrow");
    }
    return _arrowImageView;
}


- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, kWConversions(150), kHConversions(54))];
        _titleLabel.textColor = KFontBlackColor;
        _titleLabel.font = FONT_SIZE(15);
    }
    return _titleLabel;
}

-(UITextField *)textField
{
    if (!_textField) {
        CGFloat width = SCREEN_WIDTH - 34 - kWConversions(150) - 7;
        _textField = [[UITextField alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - 17 - 7 - width, 0, width, kHConversions(54))];
        _textField.textColor = KBlackColor_919395;
        _textField.textAlignment = NSTextAlignmentRight;
        _textField.font = FONT_SIZE(15);
    }
    return _textField;
}


@end
